#ifndef SERVERCONMANAGER_H
#define SERVERCONMANAGER_H

#include <QObject>
#include <QTcpServer>
#include <QVector>
#include "serverclient.h"
class ServerConManager : public QObject
{
    Q_OBJECT
public:
    ///wait for connection
    bool startListening(unsigned int iPort);
    ///clients array(only one at one time currently)
    QVector<ServerClient*> m_cClients;
private:
    QTcpServer m_cListener;


signals:

private slots:
    void slot_clientConnected();
    void slot_clientDisconnected(ServerClient* pcClient);
//singleton
private:
    explicit ServerConManager(QObject *parent = 0);
    static ServerConManager *_instance;
public:
    static ServerConManager* getInstance();

};

#endif // SERVERCONMANAGER_H
